Version

AddChart(ChartType,Rect,Action<WorksheetChart>) Method

Adds a chart to the collection with the specified bounds.
Syntax

Parameters

chartType
The type of chart to add to the collection.
boundsInTwips
The bounds of the shape on the worksheet in twips (1/20th of a point).
chartInitializer
An optional callback for initializing the chart before it is added to the collection.

Return Value

A WorksheetChart-instance.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionif worksheet is null.
Infragistics.Documents.Excel.MockClasses.InvalidEnumArgumentExceptionchartType is not defined in the Infragistics.Documents.Excel.Charts.ChartType enumeration.
System.InvalidOperationExceptionif a chart is being added to the Shapes collection of another Chart is null.
System.InvalidOperationExceptionif a Workbook.CurrentFormat doesn't support Chart mofications, e.g. 'Excel97To2003' or 'Excel97To2003Template'.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also